import com.zys.mappers.GxaUserMapper;
import com.zys.pojo.dto.SelectUserByUsernameAndPassword;
import com.zys.pojo.entity.GxaUser;
import com.zys.zys_mybatis.MapperProxyFactory2;
import org.junit.Test;

import java.sql.Timestamp;
import java.util.List;

/**
 * @BelongsProject: ZYSMybatis
 * @BelongsPackage: PACKAGE_NAME
 * @Author: ZYS
 * @CreateTime: 2024-05-30  16:07
 * @Description: TODO
 */
public class testMybatis2 {
    @Test
    public void testObjectSelect(){
        MapperProxyFactory2  mapperProxyFactory2 = new MapperProxyFactory2();
        GxaUserMapper gxaUserMapper = mapperProxyFactory2.getMapper(GxaUserMapper.class);
        SelectUserByUsernameAndPassword  selectUserByUsernameAndPassword = new SelectUserByUsernameAndPassword("周源生","123456");
        GxaUser gxaUser = gxaUserMapper.SelectUserByUsernameAndPassword(selectUserByUsernameAndPassword);
        System.out.println(gxaUser);
    }

    @Test
    public void testIDU(){
        MapperProxyFactory2  mapperProxyFactory2 = new MapperProxyFactory2();
        GxaUserMapper mapper = mapperProxyFactory2.getMapper(GxaUserMapper.class);
        int i = mapper.deleteUserById(8);
        System.out.println("删除了"+i+"条数据");
    }
}
